are no messages to write, _m_e_s_s_a_g_e_s may be specified as NNNNUUUULLLLLLLL. _l_i_b_p_o_d
provides the _P_D_M_a_k_e_M_e_s_s_a_g_e convenience function to assist in filling a
_P_D_M_e_s_s_a_g_e_S_t_r_u_c_t.
Refer to the _l_i_b_p_o_d(_3) man page for information about the "Local"
functions.
The _P_D_S_t_a_t_u_s_S_t_r_u_c_t structure is defined as follows.
typedef struct _pdStatusStruct {
int operational_status; /* Printer status */
int error_count; /* Number of messages */
/* error, warning & info */
int media_type; /* Media type */
int number_of_colors; /* Number of colors */
int media_size; /* Media size */
char printer_options[PD_STR_MAX]; /* Option info */
/* (e.g. "8 MB RAM") */
char validation_mask; /* Size validation mask */
} PDStatusStruct;
_o_p_e_r_a_t_i_o_n_a_l__s_t_a_t_u_s Code indicating the operational status of the printer
(see _p_o_d._h).
_e_r_r_o_r__c_o_u_n_t Total number of error, warning and information
messages available in the _e_r_r__s_t_a_t_u_s field of the
_P_D_I_n_f_o_S_t_r_u_c_t and in the _m_e_s_s_a_g_e_s_p array returned by
_P_D_R_e_a_d_S_t_a_t_u_s and _P_D_L_o_c_a_l_R_e_a_d_S_t_a_t_u_s. When calling
_P_D_L_o_c_a_l_W_r_i_t_e_S_t_a_t_u_s the number of message specified by
this field must match the number of messages in the
_m_e_s_s_a_g_e_s_p array and must not exceed PPPPDDDD____MMMMEEEESSSSSSSSAAAAGGGGEEEE____MMMMAAAAXXXX.
_m_e_d_i_a__t_y_p_e Code indicating the media type installed in the
printer (see _p_o_d._h).
_n_u_m_b_e_r__o_f__c_o_l_o_r_s This field is a bitmask in which the number of
colors, colorspace, pixel depth and data format are
specified. The value for this field is constructed by
bitwise OR'ing the values for each of these
attributes. The bitmasks used in this field are all
prefixed PPPPDDDD____DDDDAAAATTTTAAAA____ and can be found in _p_o_d._h. Refer to
this file for a list of all possible bitmasks. For
example, to specify an RGB colorspace with eight bits
per pixel and a planar data format set this field to
PPPPDDDD____DDDDAAAATTTTAAAA____PPPPLLLLAAAANNNNAAAARRRR |||| PPPPDDDD____DDDDAAAATTTTAAAA____DDDDEEEEPPPPTTTTHHHH8888 |||| PPPPDDDD____DDDDAAAATTTTAAAA____RRRRGGGGBBBB. The
default values for these fields are PPPPDDDD____DDDDAAAATTTTAAAA____KKKK,
PPPPDDDD____DDDDAAAATTTTAAAA____DDDDEEEEPPPPTTTTHHHH1111 and PPPPDDDD____DDDDAAAATTTTAAAA____CCCCHHHHUUUUNNNNKKKKYYYY. Macros are
provided to decompose this field into its component
codes. For example, to determine the data depth the
macro PPPPDDDD____GGGGEEEETTTT____DDDDEEEEPPPPTTTTHHHH____CCCCOOOODDDDEEEE((((nnnnuuuummmmbbbbeeeerrrr____ooooffff____ccccoooolllloooorrrrssss)))) would be
used. Refer to _p_o_d._h for a list of these macros.